1. Field of the Invention
The present invention relates to a face extraction method and a face extraction apparatus for extracting a face area from an image including a human face, and to an image processing method and an image processing apparatus using the face extraction method and the face extraction apparatus. The present invention also relates to a computer-readable recording medium storing a program to cause a computer to execute the face extraction method and the image processing method.
2. Description of the Related Art
In an image such as a photograph obtained by photographing a person by using a negative film or a reversal film, an area which attracts most attention is the face of the person. However, in the case where photographing is carried out in backlight or in a state of under-exposure, a face looks too dark. Furthermore, in the case where a close-up of a person is photographed by using flash (in high contrast caused by strobe-flash-light), a tone of the face is flattened and the face looks whitish. Moreover, when a person is photographed in daylight in fine weather, approximately a half of the face appears in shadow, creating too much contrast. Therefore, when an original image recorded on a negative film or the like is printed on a photosensitive material, exposure is adjusted by applying a method such as shading to an area corresponding to the face in the original image so that the face of the person has adequate brightness.
Meanwhile, digital image data obtained by a digital still camera (hereinafter called digital camera) and digital image data obtained by reading an image recorded on a film are reproduced as a hard copy such as a print or as a soft copy on a display screen. In this case, if photographing is carried out in under exposure, in backlight, or in high contrast caused by strobe-flash-light, not only brightness of a face can be changed to adequate brightness but also colors, tones and the like of the face can be reproduced adequately, by applying correction for brightness, tones, colors, and sharpness on image data of a face area.
When such correction is carried out on the image data, it is necessary for the face area corresponding to the face of the person to be extracted from the image represented by the image data. For example, a method comprising the steps of specifying an area including a human face in an image displayed on a monitor, specifying a pixel of a skin-color area in the face in the specified area, and extracting pixels having colors in a predetermined range as a face area by using the specified pixel color as a reference has been proposed (hereinafter, this method is called “method 1”). Alternatively, another method comprising the steps of specifying a face outline in an image displayed on a monitor by using a mouse and extracting an area enclosed by the specified outline as a face area has also been proposed (hereinafter, this method is called “method 2”).
However, in the method 1, the face area cannot be extracted if the contrast of the face is sharp, since only the pixels of the colors in the predetermined range using the specified skin color as the reference are extracted. In the case where the background of the face has the color in the predetermined range, the background is also extracted together with the face area. In the method 2, since the outline needs to be specified accurately by using a mouse, an operation for specifying the area is troublesome.